return visibleWidth;
},
- _updateTranslation: function(slidingIn) {
+ _updateTranslation: function() {
let translationStart = 0;
let translationEnd = 0;
let translation = this._getTranslation();
- if (slidingIn) {
+ if (this.visible) {
translationStart = translation;
} else {
translationEnd = translation;
},
slideIn: function() {
- this._updateTranslation(true);
this.visible = true;
- // we will update slideX from pageEmpty
+ // we will update slideX and the translation from pageEmpty
},
slideOut: function() {
this.visible = false;
- this._updateTranslation(false);
+ this._updateTranslation();
// we will update slideX from pageEmpty
},
// the next page, since slideIn or slideOut might have been called,
// changing the visiblity
this.layout.slideX = this.getSlide();
+ this._updateTranslation();
}
});